console.log("hello world");
/**引入一个原生模块 http
 * https = http  + SSL 加密传输
 * nodejs开发环境自带的模块称之为原生模块
 */
const http = require("http");
/**
 * createServer(requestListener(req, res) => {
 * 
 * })
 * req是客户端发过来的请求信息的封装对象
 * res是对客户端响应信息的封装对象
 */
let server = http.createServer((req, res) => {
    res.end("hello node, request")
})

server.listen(8080)
console.log("server is listening 8080");